Skip to content

fix(metadata-protocol): a seed owner_id naming a person resolves on objects that rely on the injected owner column - #34023

Merged
objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/area-A4-33791
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/area-A4-33791

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #33791

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

The seed loader builds its reference graph from the definition the metadata service serves, which is the one the author wrote. An object that relies on the platform's owner_id does not declare it: objectql's system-field pass adds it at registration. buildDependencyGraph read the declared fields only, so a seed owner_id: 'PERSON NAME' on such an object was stored as the name itself, while a declared Field.user() / Field.lookup('sys_user') on the same row resolved.

  • seed-loader.ts: a new seedReferenceGraphFields(definition) returns the declared fields plus owner_id as OWNER_FIELD_DEF (the sys_user lookup the registry injects) when resolveInjectedSystemColumns(definition).owner is true and the object does not declare owner_id. buildDependencyGraph iterates that map. A declared owner_id wins whatever its type; objects with no injected owner (ownership: 'org' | 'none' | 'business_unit', managedBy, a sys_* name, systemFields: false) are unchanged. The injected owner then takes the same resolution path as a declared person lookup: unscoped on a load with no organization, membership-scoped on an organization's own load, NULL plus the "not a member of organization" error for a non-member.
  • seed-org-scoped-references.integration.test.ts: the metadata stub now serves the as-authored definition (it served engine.registry.getObject(...), the enriched one, which hid this defect). The existing seed: on an organization-scoped load a reference to sys_user (owner_id: NAME) never resolves — the reference probe adds organization_id to a tenant-less object and swallows the refusal #33207 case that seeds owner_id: 'Zhang Wei' on crm_deal turned red on origin/main once the stub was corrected, and is green with the fix. A new top-level describe pins single boot, walled replay (member, same-name per organization, non-member NULL + error on both owner_id and rep), the pinned install load, and the no-organization control.
  • seed-loader-injected-owner-reference.test.ts (new): graph-level pins on authored definitions: the injected row, its equality with a declared sys_user lookup named owner_id, a declared owner_id winning, a declared non-reference owner_id, the six no-owner boundary objects, and sys_user ordering with no cycle.
  • seed-loader-reference-carrier.test.ts, seed-loader-implicit-reference-target.test.ts: their fixtures (book, crm_task) are user-owned objects, so the graph now also carries an owner_id row for them. Their assertions judge the declared carrier field, so they now read the declared field's rows only (fixture triage: the fixtures are unchanged; the new row is correct for them).
  • Changeset: @objectstack/metadata-protocol patch.

Tests

All readings below are on head 03ff3585 (after merging origin/main at b8ac0e24) unless named otherwise.

  • @objectstack/metadata-protocol pnpm test: Test Files 343 passed, 9 skipped (352); Tests 22913 passed, 43 skipped. typecheck: exit 0.
  • @objectstack/runtime typecheck: exit 0. Seed files of the runtime suite (13 files, including seed-loader.test.ts and seed-org-scoped-references.integration.test.ts): Tests 141 passed.
  • Full @objectstack/runtime pnpm test at 655dd0d1 (before the merge): 604 of 605 files passed; the one failure was seed-loader.test.ts "should ignore references to objects not in the graph", whose fixture contact is user-owned and now also carries the owner_id row. Its assertion was updated to name both rows (account_id to account, owner_id to sys_user) in 0a56c258, and the file is green at the final head.
  • Consumers of SeedLoaderService outside these packages, at 655dd0d1: objectql seed and publish files (13 files, 227 tests), @objectstack/cloud-connection marketplace-install-local* (56 files, 688 tests), @objectstack/cli seed-record-values-load-parity (1 test): all passed.

Acceptance notes

  • Ruling (card TO) implemented as written: the reference graph treats the injected owner column like a declared sys_user lookup; the pin serves the as-authored definition; a non-member resolves to NULL with the "not a member" error, as rep does.
  • The first-admin handoff (claimSeedOwnership) claims rows whose owner_id is NULL; a non-member's row is now NULL, so it is claimable. Not re-pinned here (outside this file surface); read from packages/runtime/src/app-plugin.ts.
  • content/docs/data-modeling/seed-data.mdx already promises this (the target table row for sys_user, "people: owner_id, people lookups"); its text agrees with the fix, so it is not edited.
  • Only owner_id is added. The audit *_by columns and owning_business_unit_id are also injected lookups but are readonly and server-stamped; they are not part of this card's ruling and are left as they were.
  • The card's "related observation" (on a walled boot the organization-create replay runs before the founder's sys_member row is written) is out of scope and untouched.
  • Declaration self-check: Clause-②: no and Metadata-protocol: none hold. No schema key, accepted value or metadata type moves; a seed that loaded still loads. A non-member name now lands as NULL with a reported error instead of as text, which is the behaviour the 18.5.0 changeset and docs already promised for person references.

Verification

Red first on origin/main (the card's hypothesis H1)

The new pins and the corrected stub, run against the unchanged origin/main loader (64807a9c) after a closure build:

With the fix (seed-loader.ts built into dist/): 11 of 11 and 31 of 31.

Ablation (each leg rebuilt; runtime reads metadata-protocol from dist/)

Mutation through scripts/ablation-replace.mjs: the guard if (!resolveInjectedSystemColumns(definition).owner) return fields; replaced by if (definition.fields) return fields; (anchor 1 to 0, blob 811047510bd6 to ccd9579da705), then pnpm --filter @objectstack/metadata-protocol build and ablation-dist-preflight.mjs @objectstack/metadata-protocol 'resolveInjectedSystemColumns(definition).owner' --absent: marker absent from all 24 built files. Result: the graph pins 3 failed of 11 and the runtime pins 5 failed of 31, the same cases as on origin/main. Restore: blob back to 811047510bd6 = HEAD, git diff HEAD empty, git status --porcelain empty; rebuilt, and the preflight in default mode reads the marker present in 1 built file. A first attempt that replaced the call site was refused by the dts build (TS6133 unused function), so nothing ran on it.

Gates
  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran: 66 derived, 66 run, 0 NOT-MEASURED, 0 UNRUN; every recorded exit code is 0. check:query-options-erasure hit a 300 s local timeout under a shared box once and passed on rerun; check:type-check-debt ran under the verify lock (re-measure OK, 0 errors above the record).
  • PR-body gates with this body as the event: check-changeset-no-major exit 0, check-closing-keyword-parity exit 0, check-adr-0087-registration exit 0, check-empty-changeset exit 0.
  • dispatch-gates --tier: no path-derived mandate; 254 changed lines.
  • git merge-tree --write-tree against origin/main: clean. No open PR touches seed-loader.ts or the runtime harness file (59 open PRs read through REST).
  • Full dogfood battery: not owed (no ! in the title, no (narrowing) arm).

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jUg7BKfRBcTPyMxbLh

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/metadata-protocol, touching 3 documentable anchor(s).

7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/automation/queues-and-assignment-rules.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/data-modeling/objects.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/deployment/validating-metadata.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/permissions/index.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/permissions/permissions-matrix.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/permissions/sharing-rules.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/protocol/objectql/security.mdx (via business_unit (literal, a string literal in a comment on a changed line))

⛔ 2 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/implementation-status.mdx (via business_unit (literal, a string literal in a comment on a changed line))
  • content/docs/releases/v17/17-0.mdx (via business_unit (literal, a string literal in a comment on a changed line))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json b4eea885058321e56776ab2b690e4f35e29b7a0c → packageMentionDocs.

Which tree this was computed on

This run read content/docs from f31488e4142bd64d136e9516ebb385991ad4e8c8 — the merge of head 8a8cb4e33173f263bab510cbd84d6b7a59227baf into base b4eea885058321e56776ab2b690e4f35e29b7a0c, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin f31488e4142bd64d136e9516ebb385991ad4e8c8 && git checkout f31488e4142bd64d136e9516ebb385991ad4e8c8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b4eea885058321e56776ab2b690e4f35e29b7a0c 8a8cb4e33173f263bab510cbd84d6b7a59227baf && git checkout -B drift-repro b4eea885058321e56776ab2b690e4f35e29b7a0c && git merge --no-ff 8a8cb4e33173f263bab510cbd84d6b7a59227baf

node scripts/docs-audit/affected-docs.mjs --json b4eea885058321e56776ab2b690e4f35e29b7a0c

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs b4eea885058321e56776ab2b690e4f35e29b7a0c → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUg7BKfRBcTPyMxbLh

Request: review · PR #34023 · area S2 (A4) · Fixes #33791 · head 03ff3585e9d0a441b386c6d544da32d3b7fd1f53 (declared final) · reviewer review-b

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6

Review claim · head 03ff358 · 2026-11-15T17:02Z

review (review-b, areas S2+S4): ordinary ACCEPT read per review-checklist.md; the verdict follows on this PR.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6

Review — PASS

Head-sha: 03ff3585e9d0a441b386c6d544da32d3b7fd1f53
Area: S2 · Fixes #33791 · ordinary ACCEPT read per review-checklist.md. No contract face: no packages/spec/src, no governed path, and no narrowing arm.

  1. Premise measured. On the unchanged origin/main loader, with the stub corrected to serve the as-authored definition, the graph pins fail 3/11 and the runtime pins 5/31. The existing seed: on an organization-scoped load a reference to sys_user (owner_id: NAME) never resolves — the reference probe adds organization_id to a tenant-less object and swallows the refusal #33207 owner_id: 'Zhang Wei' case also goes red. That stub is exactly the mask the card names.
    • The ablation replaced the owner guard. It was rebuilt, and a dist preflight confirmed the marker was absent. The same cases went red, then the source was restored to blob == HEAD.
  2. Mechanism, read on the tree. seedReferenceGraphFields adds owner_id to the graph only when two things hold: resolveInjectedSystemColumns(definition).owner says the column is injected, and the object does not declare owner_id.
    • The added definition is OWNER_FIELD_DEF, the same sys_user lookup that objectql's system-field pass registers (pinned equal in injected-system-columns-parity.test.ts on main). The injected owner therefore takes the declared-lookup path unchanged: unscoped with no organization, membership-scoped on an organization's load, and NULL plus "not a member" for a non-member.
    • A declared owner_id wins, whatever its type. The no-owner postures (org, none, business_unit, managedBy, sys_*, systemFields: false) are pinned unchanged.
  3. Clause-② no, Metadata-protocol: none, patch: right. No schema key, value or export moves, and OWNER_FIELD_DEF was already exported from @objectstack/spec/data. The new behaviour is the one the 18.5.0 changeset and seed-data.mdx (the sys_user target row) already promise. Dogfood is n/a because the PR has no ! and no narrowing arm.
  4. Downstream. I checked the local HotCRM clone. No seed sets a person name in owner_id. objectstack.composition.ts documents that ownership is left to the first-admin claim, and forecast.seed.ts leaves owner_id unset. The new NULL-plus-error answer therefore reaches no shipped seed. The SeedLoaderService consumers the body lists (objectql, cloud-connection install-local, cli parity) were run green.
  5. Tests.
    • The fixture triage in seed-loader-reference-carrier and seed-loader-implicit-reference-target is right. Those fixtures are user-owned objects, so the new owner_id row is correct for them, and the assertions keep judging the declared carrier field.
    • runtime/seed-loader.test.ts now names both rows.
    • The non-member cases assert NULL plus the "not a member of organization" error on both owner_id and rep.
  6. Changeset. Each sentence matches the diff, including "rewrites no stored row".
  7. Scope. Two things in the Acceptance notes are left out, and that is right for this card's ruling:
    • The audit *_by and owning_business_unit_id lookups are injected too, but they are readonly and server-stamped.
    • The card's related observation is also out: on a walled boot, the organization-create replay runs before the founder's sys_member row is written.
      Neither is filed. The seat decides in the ACCEPT whether each gets a card or an accepted-deviation line.
  8. Check-runs on the head: 35 success, 16 skipped, none failed or pending.

A clean origin/main merge whose PR patch-id equals this head's keeps this PASS (16:10Z rule). A head move that changes the patch needs a delta.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUg7BKfRBcTPyMxbLh

席位核对

Head-sha: 27a8c18d078be82fbe55f29be34c181c8c31a0f2(03ff3585 合入 origin/main,三点 diff patch-id 9ad5f52564e2 不变)· 读于 2026-11-15T17:34Z

  • 形态:种子引用图把注入的 owner_id 读成注册表加上的 sys_user 查找(OWNER_FIELD_DEF)。只在注入了 owner 且对象未声明 owner_id 时生效;声明的 owner_id 优先,不注入 owner 的对象不变。7 个文件 +242/-12,Fixes #33791。
  • 前提实测:在 origin/main 上,图钉 3/11 红、runtime 钉 5/31 红('Zhang Wei' 以字面文本入库)。消融 owner 守卫后同样转红,并经 dist 预检确认;还原后 blob 与 HEAD 一致(报告 6897674355)。
  • 门禁 check-runs:35 success / 16 skipped / 0 failure(现 head),含 Test Core (1/8–8/8)、Type Check · workspace、Lint & Repo Gates、PR-body guards、Governed Surface Queue Guard、Check Changeset。
  • 复审:review-b PASS 6898091549(03ff3585)。合入 main 后 patch-id 不变,PASS 继续有效。四面皆不涉及,无需契约记录。
  • 接受的偏差:新钉放进共享 harness seed-org-scoped-references.integration.test.ts,作为顶层 describe(依 AGENTS.md 裁决 6583487846)。三个相邻图钉只改断言,fixture 不变。注入的 created_by/updated_by/owning_business_unit_id 查找不纳入种子图:它们只读、由服务端写入,按契约不是种子里的人员引用,作为接受的偏差,不立卡。
  • 范围外去向:walled 启动时组织创建的重放早于创始人 sys_member 行写入 → seed: on a walled boot the organization-create replay runs before the founder's sys_member row is written, so the new organization's own seed cannot resolve any person, the founder included #34038(pm:queue)。HotCRM 种子不在 owner_id 里写人名,没有已发布种子会碰到新的 NULL 加报错。Skills-docs: 不适用(Metadata-protocol: none)。
  • 落地条款:check-governed-merges.mjs --pr 34023 = NOT governed,254 行 ≤ 3000;Clause-②: no,changeset 为 patch。区内落地:ready + auto-merge。

@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43741987434 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (3/8) — 失败步骤: Run this shard's tests

    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-03-31: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: @objectstack/scenarios:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 5 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUg7BKfRBcTPyMxbLh

Re-arm (one discriminating re-queue) at head 27a8c18d078be82fbe55f29be34c181c8c31a0f2, read 2026-11-15T18:01Z.

reading value
queue build 43741987434 Test Core (3/8): @objectstack/scenarios test/runner/run-date.test.ts, one case Test timed out in 5000ms (34 tests, 25.9 s); every other shard green
same file on this PR's CI job 132888568108: 18 tests, 8.9 s, green. The queue base carries more dated cases from main
failure class timeout, not an assertion. The file is not in a package this diff changes (metadata-protocol, runtime), and it was not edited by this PR
anchor #34081 (queue-flake anchor, opened from this same build; 1 independent hit)

A timeout is load-sensitive, so one re-queue of the unchanged head discriminates. If the same case times out again, I'll stop and measure the file locally on main versus this head before any further queue attempt, and report the reading here.

@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43743119181 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (3/8) — 失败步骤: Run this shard's tests

    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-03-31: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: @objectstack/scenarios:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • ⚠️ 本 PR 过去 24h 已在队列失败 1 次(不含本次)。 内容未变而反复失败 ⇒ 高度怀疑 flaky 测试或与同组 PR 的语义冲突,重排不解决。
  • 过去 24h 队列共有 6 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUg7BKfRBcTPyMxbLh

Holding the re-queue. The second queue build, 43743119181, hit the same signature (run-date.test.ts, 2028-03-31, Test timed out in 5000ms). Head is now d4179f207c73a6030e06be4a7230687387ec2e45 after a K=18 main merge; the 3-dot patch-id is unchanged at 9ad5f52564e2, so review PASS 6898091549 still holds.

Why this is not this PR's failure (read from code, not run):

  • run-date.test.ts imports only scenarios' own src (loader, prompts, run-date, score, truth). Its one cross-package import is scenario-tags.ts, which takes two pure functions (standaloneActionOwnerKey from objectql, effectiveSharingModel from plugin-sharing). No seed loader, no runtime, no metadata-protocol path.
  • Each run on <date> case walks every dated card in the library. The per-case time therefore grows as cards land on main: 18 tests in 8.9 s on this PR's base, 34 tests in 25.9 s on the queue base.
  • The same three cases timed out on PR perf(objectql)!: a cascade delete removes a relation's children as one predicate delete per chunk #33887's own CI (job 132899392965), which does not contain this diff. Reading posted on anchor Queue-flake anchor: test/runner/run-date.test.ts #34081 (6898928438).

Re-queue waits on #34081's fix, so another full queue round isn't burned.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUg7BKfRBcTPyMxbLh
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUg7BKfRBcTPyMxbLh

Re-arm at head 8a8cb4e33173f263bab510cbd84d6b7a59227baf, read 2026-11-15T23:14Z. The hold from 6899069847 is lifted.

reading value
anchor #34081 closed by #34104 (merged 2026-11-15T22:30Z). It was the only failure on both queue ejections
head 8a8cb4e3 = a clean main merge of d4179f20. The 3-dot patch-id 9ad5f52564e2 is unchanged, so PASS 6898091549 and ACCEPT 6898491819 stand
check-runs at head 35 success / 16 skipped / 0 failure / 0 pending
governed check-governed-merges --pr 34023: not governed; 254 changed lines, under the human-merge threshold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant